package com.yst.metho.web.application.vacationday;

import nextapp.echo2.app.event.ActionEvent;

import com.yst.metho.web.application.SuiviProdApp;
import com.yst.metho.web.application.components.ListingViewPane;
import com.yst.metho.web.application.interfaces.IItemViewWeb;
import com.yst.metho.web.application.utils.ExceptionMgt;
import com.yst.suivi.data.rights.Right;

public class AdminVacationView extends IItemViewWeb
{
	public AdminVacationView()
	{
		super(Right.VIEW_ADMIN_VACATION);
	}

	public void actionPerformed(ActionEvent arg0)
	{
		ListingViewPane listingView;
		try
		{
			VacationListModel usrListModel = new VacationListModel();
			listingView = new ListingViewPane(usrListModel, new VacationTableCellRenderer(), true);
			SuiviProdApp.getApp().changeWorkingArea(listingView);
		}
		catch (Throwable e)
		{
			ExceptionMgt.manage(e);
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.yst.metho.web.application.interfaces.IItemViewWeb#getCategory()
	 */
	public String getCategory()
	{
		return "Administration";
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.yst.metho.web.application.interfaces.IItemViewWeb#getName()
	 */
	public String getName()
	{
		return "Jours feries";
	}

}
